<template>
  <h3>Son</h3>
  <p>{{ count }}</p>
  <button @click="$emit('update:count', count + 1)">更新count</button>
  <p>{{ num }}</p>
  <button @click="$emit('update:num', num + 1)">更新num</button>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Son",
  props: {
    count: {
      type: Number,
      required: true,
    },
    num: {
      type: Number,
      required: true,
    },
  },
  emits: ["update:count", "update:num"],
});
</script>
